package com.kksoft.readcm.activity;

import android.content.Intent;
import android.os.Bundle;
import android.os.IBinder;
import android.os.RemoteException;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.LinearLayout;

import com.kksoft.readcm.pro.R;

public class HomeActivity extends RilAppActivity
{
//  private g g;
//  private LicenseChecker plicensechecker;

  public void onCreate(Bundle bundle)
  {
    super.onCreate(bundle);
    Button btnReadingList = (Button)findViewById(R.id.home_reading_list);
    btnReadingList.setOnClickListener(new OnClickListener(){ 
		public void onClick(View arg0) {
		    Intent localIntent = new Intent(HomeActivity.this, ReadingListActivity.class);
		    startActivity(localIntent);
        }
	});
    
    Button btnCurList = (Button)findViewById(R.id.home_current_list);
    btnCurList.setOnClickListener(new OnClickListener(){ 
		public void onClick(View arg0) {
		    Intent localIntent = new Intent(HomeActivity.this, CurrentListActivity.class);
		    startActivity(localIntent);
        }
	});
    

    Button btnReadedList = (Button)findViewById(R.id.home_read_list);
    btnReadedList.setOnClickListener(new OnClickListener(){ 
		public void onClick(View arg0) {
		    Intent localIntent = new Intent(HomeActivity.this, ReadListActivity.class);
		    startActivity(localIntent);
        }
	});
    
    LinearLayout llAdd = (LinearLayout)findViewById(R.id.home_add);
    llAdd.setOnClickListener(new OnClickListener(){ 
		public void onClick(View arg0) {
			HelpActivity.a(2, HomeActivity.this);
        }
	});
    
    LinearLayout llSetting = (LinearLayout)findViewById(R.id.home_settings);
    llSetting.setOnClickListener(new OnClickListener(){ 
		public void onClick(View arg0) {
			 Intent localIntent = new Intent(HomeActivity.this, SettingsActivity.class);
			    startActivity(localIntent);
        }
	});
    
    LinearLayout llHelp = (LinearLayout)findViewById(R.id.home_help);
    llHelp.setOnClickListener(new OnClickListener(){ 
		public void onClick(View arg0) {
			 Intent localIntent = new Intent(HomeActivity.this, HelpActivity.class);
			    startActivity(localIntent);
        }
	});
  }

  protected void onDestroy()
  {
//    if (this.plicensechecker != null)
//      this.plicensechecker.a();
    super.onDestroy();
  }

  protected final int getLayoutID()
  {
//    if (!App.getSharedPreferences().getBoolean("flammie", false))
//    {
//    	 at localat = new at(this);
//         this.g = localat;
//         a locala = new a();
//         this.plicensechecker =new LicenseChecker(this, locala);
//         g localg = this.g;
//         this.plicensechecker.a(localg);
//    }
    return R.layout.activity_home;
  }
}